package alfred.mdp.worker;

public class ShutdownTask implements Runnable {
    private final Worker worker;
    private final boolean sendDisconnect;

    public ShutdownTask(Worker worker, boolean sendDisconnect) {
        this.worker = worker;
        this.sendDisconnect = sendDisconnect;
    }

    @Override
    public void run() {
        worker.shutdown(sendDisconnect);
    }
}